<html xmlns:th="https://www.thymeleaf.org">
  <head th:include="layout :: head(title=~{::title},links=~{})">
      <title>View All</title>
  </head>
  <body th:include="layout :: body" th:with="content=~{::content}">
    <div th:fragment="content">
        <h1>Inbox</h1>
        <table class="table table-bordered table-striped">
            <thead>
                <tr>
                    <th>Created</th>
                    <th>Summary</th>
                    <th>Delete</th>
                </tr>
            </thead>
            <tbody>
                <tr th:if="${messages.empty}">
                    <td colspan="2">No messages</td>
                  </tr>
                  <tr th:each="message : ${messages}">
                    <td th:text="${#calendars.format(message.created)}">July 11, 2012 2:17:16 PM CDT</td>
                    <td><a href="view.html" th:href="@{'/' + ${message.id}}" th:text="${message.summary}">The summary</a></td>
                    <td><form class="form-inline" th:action="@{'/' + ${message.id}}" th:method="delete"><input type="submit" value="Delete"/></form></td>
                </tr>
            </tbody>
        </table>
    </div>
  </body>
</html>